package day0307;

import java.util.ArrayList;
import java.util.Collection;
import java.util.List;

public class Demo {

    public static void main(String[] args) {
//        Collection collection = new ArrayList();

        List collection = new ArrayList();
        collection.add("a");
        collection.add("b");

        System.out.println(collection.size());
        System.out.println(collection);
        System.out.println(collection.remove("a"));
        System.out.println(collection);

        System.out.println(collection.get(0));

        collection.add(0, "aaa");

        System.out.println(collection.get(0));

        collection.set(1, "bbb");
        System.out.println(collection.get(1));

        collection.add("bbb");
        collection.add(null);
        collection.add(null);
        collection.add(null);
        System.out.println(collection);
    }
}
